#!/usr/bin/env python
import simcat.client as client

lca = client.get('entity', 'lca')
sca = client.models.DataCollection()
sca.name = "Simulated Cluster Archive"
sca.short_name = "SCA"
sca.save()

contact = client.models.Contact(resource=sca, entity=lca, role="publisher")
contact.save()
contact = client.models.Contact(resource=sca, entity=lca, role="owner")
contact.save()

cool = client.models.DataCollection(parent_collection=sca)
cool.name = "Radiative Cooling Catalog"
cool.short_name = "COOL"
cool.save()

contact = client.models.Contact(resource=cool, entity=lca, role="publisher")
contact.save()
contact = client.models.Contact(resource=cool, entity=lca, role="owner")
contact.save()

sf_low = client.models.DataCollection(parent_collection=sca)
sf_low.name = "Star Formation with Low Feedback Catalog"
sf_low.short_name = "SF_LOW"
sf_low.save()

contact = client.models.Contact(resource=sf_low, entity=lca, role="publisher")
contact.save()
contact = client.models.Contact(resource=sf_low, entity=lca, role="owner")
contact.save()

sf_zero = client.models.DataCollection(parent_collection=sca)
sf_zero.name = "Star Formation with Zero Feedback Catalog"
sf_zero.short_name = "SF_ZERO"
sf_zero.save()

contact = client.models.Contact(resource=sf_zero, entity=lca, role="publisher")
contact.save()
contact = client.models.Contact(resource=sf_zero, entity=lca, role="owner")
contact.save()

lcdm = client.models.DataCollection(parent_collection=sca)
lcdm.name = "Adiabatic Gas Dynamics Catalog"
lcdm.short_name = "LCDM"
lcdm.save()

contact = client.models.Contact(resource=lcdm, entity=lca, role="publisher")
contact.save()
contact = client.models.Contact(resource=lcdm, entity=lca, role="owner")
contact.save()

client.add(sca)
